package com.jy.rhin.support.parsing.enums;

import lombok.Getter;

/**
 * @Description: 会诊记录文档体部分
 * @Author: lww
 * @Date: 2022/6/23 9:01
 */
@Getter
public enum RecordElementEnum {

    /**
     * 文档体-会诊原因部分
     */
    CAUSE("DE06.00.039.00", "cause.2"),
    /**
     * 文档体-会诊意见部分
     */
    OPINION("DE06.00.038.00", "opinion.2"),
    ;
    private String code;
    private String name;

    private RecordElementEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static RecordElementEnum lookup(String name) {
        if (name == null || "".equals(name)) {
            return null;
        }
        for (RecordElementEnum value : values()) {
            if (value.name.equals(name)) {
                return value;
            }
        }
        return null;
    }
}
